package com.wyf.video.adapter

import android.support.v4.app.Fragment
import android.support.v4.app.FragmentManager
import android.support.v4.app.FragmentPagerAdapter


/**
 * Created by Administrator on 2017/11/6.
 */

 class MyPagerAdapter(mViewList: List<Fragment>,titleList:List<String> ,fm: FragmentManager) : FragmentPagerAdapter(fm) {

    var mViewList:List<Fragment>
    var titleList:List<String>

    init {
        this.mViewList = mViewList
        this.titleList = titleList
    }

    override fun getItem(position: Int): Fragment {
        return mViewList.get(position)
    }


    override fun getCount(): Int {
        return  mViewList.size
    }


    override fun getPageTitle(position: Int): CharSequence? {
        return titleList[position]
    }


}